/**
 * Copyright 2021 jianggujin (www.jianggujin.com).
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jianggujin.modulelink.action;

import java.lang.reflect.Method;

/**
 * 对Action进行包裹，提供关于Action的额外信息
 * 
 * @author jianggujin
 *
 */
public final class JActionWrapper {
    private final String name;
    private final boolean isDefault;
    private final String description;
    private final Method executeMethod;
    private final Object action;
    private final Class<?> actionClass;

    public JActionWrapper(String name, boolean isDefault, String description, Method executeMethod, Object action,
            Class<?> actionClass) {
        this.name = name;
        this.isDefault = isDefault;
        this.description = description;
        this.executeMethod = executeMethod;
        this.action = action;
        this.actionClass = actionClass;
    }

    public String getName() {
        return name;
    }

    public boolean isDefault() {
        return isDefault;
    }

    public String getDescription() {
        return description;
    }

    public Method getExecuteMethod() {
        return executeMethod;
    }

    public Object getAction() {
        return action;
    }

    public Class<?> getActionClass() {
        return actionClass;
    }
}
